<h2 class="h2-title">Sửa liên kết !!!</h2>

<?php if(isset($msg) AND $msg != ''):?>
<ul class="notification err">
    <li class="notifi_img"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_circle.png"/></li>

    <li class="msg"><?=$msg?></li>

    <li class="close"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_grey_small.png"/></li>

</ul><!--End of .notification -->

<?php else:?>

<div class="form_input_index">
    <ul class="form_text">
    <form action="<?=base_url()?>backend/cms/editlink/<?= $link->link_id?>" enctype="multipart/form-data" method="POST">
        <li class="text_input">Tên hãng</li>
        <li><input type="text" value="<?=$link->link_company?>" name="link_company" class="input-post"/></li>
        <?= form_error('link_company','<li class="errors">','</li>'); ?>

        <li class="text_input">Đường dẫn</li>
        <li><input type="text" value="<?=$link->link?>" name="link" class="input-post"/></li>
        <?= form_error('link','<li class="errors">','</li>'); ?>

        <li class="text_input">Hình ảnh</li>
        <li><img style="border: 2px solid #222;" width="150px" height="100px" src="<?=base_url()?><?=$link->link_image_thumb?>" /></li><br />
        <input type="file" value="<?=base_url()?><?=$link->link_image?>" id="link_image" name="link_image" />

        <li class="text_input">Chế độ mở</li>
        <select name="link_open">
            <option value="1" <?php if($link->link_open == 1):  echo ' selected '; endif ?>>Mở trang mới</option>
            <option value="0" <?php if($link->link_open == 0):  echo ' selected '; endif ?>>Mở tại trang hiện tại</option>
        </select>

        <li class="text_input">Trạng thái</li>
        <select name="link_status">
            <option value="1" <?php if($link->link_status == 1):  echo ' selected '; endif ?>>Hiển thị</option>
            <option value="0" <?php if($link->link_status == 0):  echo ' selected '; endif ?>>Ẩn</option>
        </select>
        <div style="clear: both;"></div>
        <input type="submit" class="sub" value="Đồng ý" name="sub"/>
        <a href="<?=base_url()?>backend/cms/link" class="bnt">Quay lại</a>
    </form>
    </ul>
</div>
<?php endif;?>